package com.uzai.console.service.feign;

import com.uzai.console.common.UzaiRespVo;
import com.uzai.console.jsonvo.contract.ContractSignAddressJson;
import com.uzai.console.service.feign.dto.ContractOpeDto;
import com.uzai.console.service.feign.dto.ContractRevokeDto;
import com.uzai.console.service.feign.dto.CreateContractDto;
import com.uzai.console.service.feign.impl.UzaiContractFeignFallbackFactory;
import com.uzai.console.vo.contract.ContractAddressVo;
import com.uzai.console.vo.contract.ContractDownLoadVo;
import com.uzai.console.vo.contract.ContractSignInfoVo;
import com.uzai.console.vo.feign.contract.ContractSignFlowIdVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 悠哉合同管理
 * @Auther: liuyanyan
 * @Date: 2024/05/22 10:39
 * @Description:
 */
@Component
@FeignClient(value = "uzai-contract-server", fallbackFactory = UzaiContractFeignFallbackFactory.class)
public interface UzaiContractFeignService {

    /**
     * 创建合同接口
     * @author liuyanyan
     * @date 2024/05/22 10:39
     * @param createContractDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.String>
     */
    @PostMapping("/create/contract")
    UzaiRespVo<ContractSignFlowIdVo> createContract(@RequestBody CreateContractDto createContractDto);

    /**
     * 撤销合同接口
     * @author liuyanyan
     * @date 2024/05/22 10:39
     * @param contractRevokeDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/revoke/contract")
    UzaiRespVo<Object> revokeContract(@RequestBody ContractRevokeDto contractRevokeDto);

    /**
     * 获取合同下载地址
     * @author liuyanyan
     * @date 2024/05/22 10:39
     * @param createContractDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.String>
     */
    @PostMapping("/get/contract/download/url")
    UzaiRespVo<ContractDownLoadVo> getContractDownloadUrl(@RequestBody ContractOpeDto createContractDto);

    /**
     * 查询合同信息
     * @author liuyanyan
     * @date 2024/05/22 10:39
     * @param createContractDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.String>
     */
    @PostMapping("/get/contract/info")
    UzaiRespVo<ContractSignInfoVo> getContractInfo(@RequestBody ContractOpeDto createContractDto);

    /**
     * 获取合同签署地址
     * @author liuyanyan
     * @date 2024/05/22 10:39
     * @param createContractDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.String>
     */
    @PostMapping("/get/contract/sign/url")
    UzaiRespVo<ContractSignAddressJson> getContractSignUrl(@RequestBody ContractOpeDto createContractDto);


}
